package domain;

import java.util.Random;

/**
 * 玩家类
 */
public class Player {
    //定义属性
    private int iq;        //智力
    private int pf;     //体质
    private int fs;      //颜值
    private int ffs;    //家境
    private int luck;      //运气
    private int age;       //年龄
    private String name;
    private int deathAge;  //死亡年龄

    public Player() {

    }

    public void setDeathAge(int deathAge) {
        this.deathAge = deathAge;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /*
   *
    * 死亡年龄设计: 死亡年龄随机数从[60,100]
    *
    * */

    public Player(int iq, int pf, int fs, int ffs, int luck) {
        this.iq = iq;
        this.pf = pf;
        this.fs = fs;
        this.ffs = ffs;
        this.luck = luck;
        this.age = 0;
        //TODO 后面可能需要修改一下死亡年龄的范围，默认在 0 到 100
        this.deathAge = new Random().nextInt(0, 100);
    }

    public int getIq() {
        return iq;
    }

    public void setIq(int iq) {
        this.iq = iq;
    }

    public int getPf() {
        return pf;
    }

    public void setPf(int pf) {
        this.pf = pf;
    }

    public int getFs() {
        return fs;
    }

    public void setFs(int fs) {
        this.fs = fs;
    }

    public int getFfs() {
        return ffs;
    }

    public void setFfs(int ffs) {
        this.ffs = ffs;
    }

    public int getLuck() {
        return luck;
    }

    public void setLuck(int luck) {
        this.luck = luck;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getDeathAge() {
        return deathAge;
    }
}
